import {createRouter,createWebHistory,createWebHashHistory} from 'vue-router'
import Home from '@/views/Home.vue'
const routes=[
    {
        path: '/',
        redirect: '/home'
    },
    {
        path: '/home',
        name: 'home',
        component: Home //默认直接加载
    },
    {
        path: '/test',
        name: 'test',
        component: () => import('@/views/TestStore.vue')  //懒加载，点击时跳转
    }
]
const router=createRouter({
    // history:createWebHistory(),
    history:createWebHashHistory(), //只能用hash模式
    routes
})

export default router
